home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
varia
/
egebook.lha
/
ege.book
/
9
/
format.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-06-04
|
427b
|
13 lines
// program illustrates formatted output
#include <stream.h> // definitions for stream IO
#include <stdio.h> // definitions for C style IO
main(){
int cm = 100; // integer variable initialization
const float convert = 2.54; // floating point constant
cout << form("%d centimeters are %f inches\n",cm,cm/convert);
printf("%d centimeters are %f inches\n",cm,cm/convert);
}